package  
{
	import net.flashpunk.Entity;
	import net.flashpunk.graphics.Spritemap;
	import net.flashpunk.Sfx;
	import net.flashpunk.FP;
	/**
	 * ...
	 * @author Donatello
	 */
	public class Bomb extends Entity
	{
		[Embed(source = "img/bombSheet.png" )] private const ANIM:Class;
		private var anim:Spritemap;	
		
		private var time:Number=0.0;
	
		public function Bomb(px:Number,py:Number) 
		{
			anim = new Spritemap(ANIM, 16, 17);
			anim.add("tictac", [0, 1, 2],10, true);
			
						
			anim.scale = 2;
			graphic = anim;
						
			x = px;
			y = py;
			
			anim.play("tictac");
			
		}
				
		override public function update():void
		{
			time += FP.elapsed;
			
			if (time > 3)
			{	
				FP.world.add(new Fire(x, y));
				FP.world.remove(this);
			}
		}
		
	}

}